#include<iostream>
using namespace std;
const int maxn = 10000;
int ex5_2_1()
{
	int a[maxn];
	int i, n,k,j,num;
	int index = 0;
	cin >> n;
	for (i = 0; i < n; i++)
	{
		cin >> a[i];
	}
	num = a[0];
	for (i = 1; i < n; i++)
	{
		
		if (num > a[i])
		{
			num = a[i];
			index = i;
		}
	}
	cout << "index=" << index << ", a="<<a[index]<<endl;
	for (;index > 0; index--)
	{
		k = a[index];
		a[index] = a[index-1];
		a[index-1] = k;
	}
	for (i = 0; i < n; i++)
	{
		cout << a[i] <<"," ;
	}
	return 0;
}